<ul class="nav nav-tabs">
	<li ng-repeat="tab in pagedata.tabs" ng-class="{'active':pagedata.op==tab.op}"><a href="javascript:;" ng-click="access(tab.op)">{{tab.title}}</a></li>
</ul>
<style>
	.pad-left {padding-left:50px;height:30px;line-height:30px;background:url('../core/resource/images/bg_repno.gif') no-repeat -245px -545px;}
	.pad-bottom {padding-left:50px;height:30px;line-height:30px;background:url('../core/resource/images/bg_repno.gif') no-repeat -245px -595px;}
	.add{cursor:pointer;padding-top:5px}
	.system{cursor:pointer}
</style>
<div class="alert alert-success alert-dismissable">
		<i class="fa fa-bullhorn alert-link"></i> 【<red>温馨提示</red>】：
		<br>1、这里的页面可视化操作，只适合前期新手开发使用；
		<br>2、对手已经上手的，直接文件代码编辑也许开发速度更快（本地菜单的实现代码位置：插件目录/model/menu.php文件）；
		<br>3、[新手必看]-快速开发小技巧http://s.jinyunweb.com/manage/index.php?p=core&amp;a=article.show&amp;id=418	
</div>
<div class="clearfix template">
	<div class="form-horizontal">
	<div class="panel">
		<div class="panel-body table-responsive">
			<table class="table jinyun-table table-hover">
				<tr>
					<th style="padding: 6px 6px;" width="40">排序</th>
					<th style="padding: 6px 6px;" width="90">名称</th>
					<th style="padding: 6px 6px;" width="40">ico</th>
					<th style="padding: 6px 6px;" width="180">菜单动作</th>
					<th style="padding: 6px 6px;" width="710">子菜单</th>
					<th style="padding: 6px 6px;" width="60">操作</th>
				</tr>
				<tr ng-repeat="menu in pagedata.menus">
					<td style="padding: 6px 6px;"><input type="text" name="displayorder" ng-model="menu.paixu" class="form-control" style="padding: 6px 6px;width:28px"></td>
					<td style="padding: 6px 6px;">
						<div class=""><input type="text" class="form-control" style="width:90px;display:inline-block" ng-model="menu.title"/><i class="fa " ng-class="{'fa-plus':!menu.show_child,'fa-minus':menu.show_child}" ng-click="toogle(menu,'show_child')"> </i></div>
					</td>
					<td style="padding: 6px 6px; width:40px">											
						<a href="javascript:;" ng-click="modal_func(menu,'fa','tools.icon')"><i class="fa {{menu.fa || 'fa-anchor'}}"></i></a>
					</td>
					<td style="padding: 6px 6px; width:100px" >											
						<div><input type="text" style="display:inline-block" ng-model="menu.url" class="form-control"></div>
					</td>
					<td style="padding: 6px 6px;">
						<table class="table jinyun-table table-hove" ng-show="menu.show_child">
							<tr >
								<th style="padding: 6px 6px;" width="40">排序</th>
								<th style="padding: 6px 6px;" width="90">名称</th>
								<th style="padding: 6px 6px;" width="40">ico</th>
								<th style="padding: 6px 6px;" width="380">子菜单</th>
								<th style="padding: 6px 6px;" width="60">操作</th>
							</tr>
							<tr ng-repeat="sub in menu.child" ng-show="menu.child && menu.show_child">
								<td style="padding: 6px 6px;"><input type="text" name="displayorder" ng-model="sub.paixu" class="form-control" style="padding: 6px 6px;width:28px"></td>
								<td style="padding: 6px 6px;">
									<div><input type="text" style="width:90px;display:inline-block" ng-model="sub.title" class="form-control"> <i class="fa " ng-class="{'fa-plus':!sub.show_child,'fa-minus':sub.show_child}" ng-click="toogle(sub,'show_child')"> </i></div>
								</td>
								<td style="padding: 6px 6px; width:40px">											
									<a href="javascript:;" ng-click="modal_func(sub,'fa','tools.icon')"><i class="fa {{sub.fa || 'fa-anchor'}}"></i></a>
								</td>
								<td style="padding: 6px 6px;">
								<table ng-show="sub.show_child">
									<tr>
										<th style="padding: 6px 6px;" width="48">排序</th>
										<th style="padding: 6px 6px;" width="100">名称</th>
										<th style="padding: 6px 6px;" width="40">ico</th>
										<th style="padding: 6px 6px;" width="180">页面地址</th>
										<th style="padding: 6px 6px;" width="60">操作</th>
									</tr>
									<tr ng-repeat="sub1 in sub.child" ng-show="sub.child && sub.show_child">
										<td><input type="text" name="" ng-model="sub1.paixu" class="form-control" style="padding: 6px 6px;width:28px" ng-init="pagedata.action_names=pagedata.action_names+sub1.action+';'"></td>
										<td><div><input type="text" style="width:90px;display:inline-block" name="title" ng-model="sub1.title" class="form-control"></div></td>
										<td>											
											<a href="javascript:;" ng-click="modal_func(sub1,'fa','tools.icon')"><i class="fa {{sub1.fa || 'fa-anchor'}}"></i></a>
										</td>
										<td>
											<div><input type="text" style="display:inline-block" name="title" ng-model="sub1.url" class="form-control"></div>
										</td>
										<td>
											<a title="删除" href="javascript:;" ng-click="sub.child.splice($index,1)" class="btn btn-danger" style="padding: 6px 6px;">删除</a>
										</td>
									</tr>
									<tr>
										<td colspan="11">
											<div class="pad-bottom pull-left" style="margin-left:110px"></div>
											<div class="pull-left add" ng-click="newsub={'title':'','url':''};sub.child.push(newsub)" ><i class="fa fa-plus-circle"></i> 添加菜单</div>
											
										</td>
									</tr>
								</table>
								</td>
								<td style="padding: 6px 6px;">
									
									<a title="删除" href="javascript:;" ng-click="menu.child.splice($index,1)" class="btn btn-danger" style="padding: 6px 6px;">删除</a>
									
								</td>
								
							</tr>
							<tr>
								<td></td>
								<td colspan="10"><div class="pad-bottom pull-left"></div> <div class="pull-left add" ng-click="newsub={'title':'','child':[]};menu.child.push(newsub)"> &nbsp;&nbsp;<i class="fa fa-plus-circle"></i> 添加菜单组</div></td>
							</tr>
								
						</table>
					</td>
					<td style="padding: 6px 6px;">
						<a title="删除" href="javascript:;" ng-click="pagedata.menus.splice($index,1)" class="btn btn-danger" style="padding: 6px 6px;">删除</a>
					</td>
				</tr>
				<tr>
					<td></td>
					<td colspan="9"><div class="add" ng-click="newsub={'title':'','icon':'','url':'','child':[]};pagedata.menus.push(newsub)"><i class="fa fa-plus-circle"></i> 添加顶级分类</div></td>
				</tr>
			</table>
		</div>
	</div>
	<div class="form-group col-sm-12">
		<button class="btn btn-primary" ng-click="post(pagedata.menus,'framess')">提交</button>
	</div>
	</div>
</div>
